Skip to content

HDDS-13774. [Recon] Consolidate NSSummary endpoint tests into one suite#10769

Merged
priyeshkaratha merged 1 commit into
apache:masterfrom
priyeshkaratha:HDDS-13774
Jul 22, 2026
Merged

HDDS-13774. [Recon] Consolidate NSSummary endpoint tests into one suite#10769
priyeshkaratha merged 1 commit into
apache:masterfrom
priyeshkaratha:HDDS-13774

Conversation

@priyeshkaratha

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

The NSSummary REST API had three near-duplicate test classes TestNSSummaryEndpointWith{FSO,Legacy,OBSAndLegacy} (~4,500 lines). This replaces them with a single @ParameterizedClass suite (TestNSSummaryEndpoint) driven by per-layout scenario objects, sharing all constants, fixtures, and assertions.

  • Duplication: FSO and Legacy were ~95% identical; all three repeated the mock SCM, replica generation, and populate logic.
  • Weak replication coverage: the three Ratis tests asserted getReplicatedSize(response.getSize()) == response.getSizeWithReplica() — both sides from the endpoint's own output, so they passed regardless of correctness. Keys were written with factor ONE, so sizeWithReplica collapsed to the raw size despite elaborate multi-block/container setup.

Multi-block keys now use genuine RATIS/THREE replication; replication tests assert sizeWithReplica (3×) and raw size against independent constants.

What is the link to the Apache JIRA

HDDS-13774

How was this patch tested?

TestNSSummaryEndpoint: 117 run, 0 failures. checkstyle.sh and rat.sh clean

Generated-by: Claude Code (Opus 4.8)

@priyeshkaratha
priyeshkaratha marked this pull request as ready for review July 15, 2026 02:11
@devmadhuu
devmadhuu self-requested a review July 22, 2026 14:57

@devmadhuu devmadhuu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @priyeshkaratha for the patch. Changes LGTM +1

@priyeshkaratha

Copy link
Copy Markdown
Member Author

Thanks @devmadhuu for reviewing the changes.

@priyeshkaratha
priyeshkaratha merged commit fb3fdcc into apache:master Jul 22, 2026
42 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants